import service from '@/utils/request'
import {ApiResponse,ListApiResponse} from '@/store/dataType.ts'
export const API_NOTICE = {
  // 查询公告列表
  listNotice:(query:any):Promise<ListApiResponse> => {return service.get('/system/notice/list',{params: query})},

  // 查询公告详细
  getNotice:(noticeId:string | number):Promise<ApiResponse> => {return service.get('/system/notice/' + noticeId)},

  // 新增公告
  addNotice:(data:any):Promise<ApiResponse> => {return service.post('/system/notice',data)},

  // 修改公告
  updateNotice:(data:any):Promise<ApiResponse> => {return service.put('/system/notice',data)},

  // 删除公告
  delNotice:(noticeId:string|number):Promise<ApiResponse> => {return service.delete('/system/notice/' + noticeId)}

}
